package com.job.model;

import org.hibernate.annotations.GenericGenerator;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * 全国主要市级 数据库
 * 地名类
 * @author hasee
 */
@Entity()
@Table()
public class City {
    /**
     * 地名id
     */
    private int cityId;
    /**
     *父id
     * 省级id
     */
    private int parentId;
    /**
     * 地名
     */
    private String cityName;
    /**
     * sort 类
     * 所在的省的id
     */
    private int sortId;
    @Id
    @GeneratedValue(generator="increment")
    @GenericGenerator(name="increment", strategy = "increment")
    public int getcityId() {
        return cityId;
    }

    public void setcityId(int cityId) {
        this.cityId = cityId;
    }

    public int getParentId() {
        return parentId;
    }

    public void setParentId(int parentId) {
        this.parentId = parentId;
    }

    public String getcityName() {
        return cityName;
    }

    public void setcityName(String cityName) {
        this.cityName = cityName;
    }

    public int getSortId() {
        return sortId;
    }

    public void setSortId(int sortId) {
        this.sortId = sortId;
    }


    @Override
    public String toString() {
        return "City{" +
                "cityId=" + cityId +
                ", parentId=" + parentId +
                ", cityName='" + cityName + '\'' +
                ", sortId=" + sortId +
                '}';
    }
}
